package info.motteke.qjdbc.dto;

import java.util.HashMap;
import java.util.Map;

public final class DtoMetaPool {

    private static final Map<Class<?>, DtoMeta<?>> map = new HashMap<Class<?>, DtoMeta<?>>();

    private static final Object lock = new Object();

    public static DtoMeta<?> get(Class<?> clazz){
        synchronized(lock){
            return map.get(clazz);
        }
    }

    public static void resister(Class<?> clazz, DtoMeta<?> meta){
        synchronized (lock) {
            map.put(clazz, meta);
        }
    }
}
